
#include "predef.h"

#include "ioset1.h"
#include "public.h"
#include "sysdata.h"
#include "meter.h"
#include "fileset1.h"
#include "StdPeriph_Driver.h"
#include "app.h"

#include "carry_wave.h"
extern struct stSOFTCON stsoftcon;
int
init_carry_wave (void)
{
  if (IsUpB (Event_CarryWave_Device) && ((*((u8 *) 0x4800)) != 0xAA))
    {

      GPIOA->DDR |= 1;
      CFG->GCR = CFG_GCR_SWD;
      GC_ResIO (Pin_EX_Rst);
    }
  Set_SoftTime (msTime_CarryWave, cGetB (Event_CarryWave_Device), 1);
  if (IsUpB (msTime_CarryWave) && ((*((u8 *) 0x4800)) != 0xAA))
    {
      GC_SetIO (Pin_EX_Rst);
      GPIOA->DDR &= (u8) (~1);
      CFG->GCR = 0;
      ClrB (Event_CarryWave_Device);
    }


}
